import { defineStore } from 'pinia';
const videoStore = defineStore('video', {
  state: () => ({
    videoCategory: [] as any[],
  }),
  getters: {},
  actions: {
    updateVideoCategory(videoCategory: any[]) {
      if (videoCategory) {
        this.videoCategory = videoCategory;
      }
    },
  },
  persist: {
    key: 'VIDEO_STATE',
    // 修改为 sessionStorage，默认为 localStorage
    storage: window.sessionStorage,
  },
});

export default videoStore;
